# -*- coding: utf-8 -*-

import os

basedir = os.path.abspath(os.path.dirname(__file__))


class Config:
    SECRET_KEY = 'LVZ1e18y}|*r%>hC]t[!D$Q*9H^RBdUWkZ9F3cM~\8W]RD~uM#nUSvc-PC@\[7io'
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    FLASKY_MAIL_SUBJECT_PREFIX = '[BBA_RPT]'
    FLASKY_MAIL_SENDER = 'BBA Dev <tangzk@yeah.net> QQ:327630285'
    FLASKY_ADMIN = os.environ.get('FLASKY_ADMIN')

    @staticmethod
    def init_app(app):
        pass


class DevelopmentConfig(Config):
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = 'oracle://<username>:<password>@<host>:<port>/<sid>'
    SQLALCHEMY_BINDS = {
        '<sub_database_name>': 'oracle://<username>:<password>@<host>:<port>/<sid>'
    }


class TestingConfig(Config):
    TESTING = True
    SQLALCHEMY_DATABASE_URI = 'oracle://<username>:<password>@<host>:<port>/<sid>'
    SQLALCHEMY_BINDS = {
        '<sub_database_name>': 'oracle://<username>:<password>@<host>:<port>/<sid>'
    }


class ProductionConfig(Config):
    DEBUG = False
    TESTING = False
    SQLALCHEMY_DATABASE_URI = 'oracle://<username>:<password>@<host>:<port>/<sid>'
    SQLALCHEMY_BINDS = {
        '<sub_database_name>': 'oracle://<username>:<password>@<host>:<port>/<sid>'
    }


config = {
    'development': DevelopmentConfig,
    'testing': TestingConfig,
    'production': ProductionConfig,
    'default': DevelopmentConfig
}
